#pragma once
//旅客信息
#include <string>
#include <chrono>
#include <map>
#include <vector>
#include "include/book.h"


using namespace std;

class Client {
public:
	//构造，析构函数
	Client();
	~Client();

	// CRDU
	bool AddClient(int64_t clientId,string clientName,string clientPhone, string passWord);
	bool DeleteClient(int64_t clientId);
	bool ModifyClient(int64_t clientId, map<string, string> entry);
	Client* SearchClient(int64_t clientId);
	int64_t SearchClient(string clientName,string passWord);
	bool SearchClientExist(string clientName,string clientPhone);
	vector<Client> SearchAllClient();


	// 订票
	bool BookTripTicket(unsigned int tripId);
	// 退票
	bool RefundTripTicket(unsigned int tripId);
	// 查询所有预订单
	vector<Book> SearchAllBookMsg();
	// 查询所有退订单
	vector<Book> SearchAllRefundMsg();
	// 查询用户是否已经预订
	bool IsBookTripTicket(unsigned int tripId);



	// 成员变量访问和修改函数
	int64_t getClientId() const;
	void setClientId(int64_t id);


	string getClientName() const;
	void setClientName(const string& name);

	string getClientPhone() const;
	void setClientPhone(const string& phone);

	string getPassWord() const;
	void setPassWord(const string& password);

private:
	int64_t clientId;
	string clientName;
	string clientPhone;
	string passWord;
};